Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚨 Fix Clippy error use_or_insert_with #150

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

nicokosi
Copy link
Owner

Fixes CI failing with commit 6db5049:

error: use of `or_insert_with` to construct default value
Error:    --> src/lib.rs:115:18
    |
115 |                 .or_insert_with(Vec::new))
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
    = note: `-D clippy::unwrap-or-default` implied by `-D warnings`

https://github.com/nicokosi/pullpito/actions/runs/6887187730/job/18733990115

Seems related to Cargo 1.73 update.

I had to uninstall Hombrew-installed Rust to reproduce locally:

brew rm rust # Cargo 1.72.1

@nicokosi nicokosi changed the title 🚨 Fix Clippy error 'use_or_insert_with' 🚨 Fix Clippy error use_or_insert_with Nov 20, 2023
@nicokosi nicokosi marked this pull request as draft November 20, 2023 06:06
Fixes CI failing with commit 6db5049:

	error: use of `or_insert_with` to construct default value
	Error:    --> src/lib.rs:115:18
	    |
	115 |                 .or_insert_with(Vec::new))
	    |                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
	    |
	    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
	    = note: `-D clippy::unwrap-or-default` implied by `-D warnings`

https://github.com/nicokosi/pullpito/actions/runs/6887187730/job/18733990115

Seems related to Cargo 1.73 update.

I had to uninstall Hombrew-installed Rust to reproduce locally:

	brew rm rust # Cargo 1.72.1
@nicokosi nicokosi force-pushed the fix_CI_due_to_Clippy_error_use_or_insert_with branch from 86b7c54 to 0c4e29f Compare November 20, 2023 06:11
@nicokosi nicokosi marked this pull request as ready for review November 20, 2023 06:13
@nicokosi nicokosi closed this Nov 20, 2023
@nicokosi nicokosi reopened this Nov 20, 2023
@nicokosi nicokosi merged commit 59b9e43 into main Nov 20, 2023
1 check passed
@nicokosi nicokosi deleted the fix_CI_due_to_Clippy_error_use_or_insert_with branch November 20, 2023 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant